package pe.edu.upc.dew.cine.web;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HolaServlet extends HttpServlet {

	private static final long serialVersionUID = 3073628194612743904L;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		System.out.println("HolaServlet");

		String nombre = req.getParameter("nombre");
		String apellido = req.getParameter("apellido");

		PrintWriter writer = resp.getWriter();
		writer.println("<h1>Hola Servlet " + nombre + " " + apellido + "</h1>");
		writer.close();
	}
}
